// @ts-ignore
/* eslint-disable */
import request from "@/request";

/** deleteComment DELETE /api/article/article/comment/delete */
export async function deleteCommentUsingDelete(
  body: API.AppComment,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/article/article/comment/delete",
    {
      method: "DELETE",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** editComment PUT /api/article/article/comment/edit */
export async function editCommentUsingPut(
  body: API.AppComment,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/article/article/comment/edit",
    {
      method: "PUT",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** listAll POST /api/article/article/comment/list */
export async function listAllUsingPost(
  body: API.ArticleCommentQueryRequest,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseListAppComment_>(
    "/api/article/article/comment/list",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** replyComment POST /api/article/article/comment/reply */
export async function replyCommentUsingPost(
  body: API.AppComment,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/article/article/comment/reply",
    {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
      },
      data: body,
      ...(options || {}),
    }
  );
}

/** ifLiked GET /api/article/article/likes/ifLiked */
export async function ifLikedUsingGet(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.ifLikedUsingGETParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/article/article/likes/ifLiked",
    {
      method: "GET",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}

/** likeArticleOrNot POST /api/article/article/likes/likeOrNot */
export async function likeArticleOrNotUsingPost(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.likeArticleOrNotUsingPOSTParams,
  options?: { [key: string]: any }
) {
  return request<API.BaseResponseBoolean_>(
    "/api/article/article/likes/likeOrNot",
    {
      method: "POST",
      params: {
        ...params,
      },
      ...(options || {}),
    }
  );
}
